package data;

import java.util.HashMap;
import java.util.Map;

public class PlayerCache {
	private Map<String, RankPlayer> _index = new HashMap<String, RankPlayer>();
	
	synchronized public void add(RankPlayer player) {
		_index.put(player.guid, player);
	}
	
	synchronized public void remove(RankPlayer player) {
		_index.remove(player.guid);
	}

	synchronized public RankPlayer findByID(String guid) {
		return _index.get(guid);
	}
}
